#ifndef __COMMON_H
#define __COMMON_H

#include <any>
#include <string>
#include <cstdio>


using Stat = std::any;
using Type = std::any;

constexpr size_t ALIGN_SIZE = 4;

#define panic(fmt, ...) do {\
    printf(fmt, ##__VA_ARGS__); abort();\
} while (0)

#define Sprintf(...) ({char _[128];std::sprintf(_,##__VA_ARGS__);[](char*_){return std::string(_);}(_);})


enum : int {
  zero = 0, 
  at, v0, v1, a0, a1, a2, a3, t0, t1, 
  t2, t3, t4, t5, t6, t7, s0, s1, s2, s3, 
  s4, s5, s6, s7, t8, t9, k0, k1, gp, sp, 
  fp, ra
};



#endif // __COMMON_H